import { ScrollbarPlugin } from 'smooth-scrollbar';
export default class autoX extends ScrollbarPlugin {
  static pluginName = 'wheel-autoX';
  transformDelta(delta, fromEvent) {
    // console.log(this, delta, fromEvent);
    if (!fromEvent.type.match(/wheel/i)) {
        return delta;
    }
    if (this.scrollbar.limit.y) {
        return delta;
    } else {
        return {
            x: delta.y,
            y: delta.x
        }
    }
  }
}